Elementary and unsafe solutions

The simplest consists in using the commands normalshapemediumseriesnormalshapemediumseries\leftrepeatsymbol, normalshapemediumseriesnormalshapemediumseries\rightrepeatsymbol and normalshapemediumseriesnormalshapemediumseries\leftrightrepeatsymbol – coded outside the normalshapemediumseries\notes...normalshapemediumseries\enotes pairs – which will simply insert these colon adorned double bars at the requested place. For example:


\begin{music}
\generalsignature{0}\savesignature
\nbporteesi=1\cleftoksi=...
...hu i\enotes
\rightrepeatsymbol
\Notes\wh j\enotes
\finextrait
\end{music}

has been coded as:

\notes\hu g\enotes
\leftrepeatsymbol
\notes\hu h\enotes
\leftrightrepeatsymbol
\notes\hu i\enotes
\rightrepeatsymbol
\Notes\wh j\enotes


However, the previous way of coding does not provide for line breaking at repeat bars, nor does it advance the bar numbering. In fact, this way of coding if only fit for repeats occurring in the middle of a bar.


A second way of coding consists in saying normalshapemediumseriesnormalshapemediumseries\setleftrepeat, normalshapemediumseriesnormalshapemediumseries\setrightrepeat or normalshapemediumseriesnormalshapemediumseries\setleftrightrepeat before a bar ( normalshapemediumseriesnormalshapemediumseries\barre), normalshapemediumseriesnormalshapemediumseries\suspmorceau or normalshapemediumseriesnormalshapemediumseries\changecontext). In this case, the next single2.18 vertical bar will be replaced with the selected repeat bar. This meets the traditional music typesetting conventions in the only case of the right repeat but, unfortunately, left and left/right repeats use to behave in a different manner when in the middle of a line and at a line break.